package org.john.guavatest;

/**
 * Created by adsame on 17-1-25.
 */
public class IDAndParty {
    public String id;
    public String party;

    public IDAndParty(String id, String party) {
        this.id = id;
        this.party = party;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof IDAndParty)) {
            return false;
        }
        IDAndParty idAndParty = (IDAndParty) o;
        return id.equals(idAndParty.id) && party.equals(idAndParty.party);
    }

    @Override
    public int hashCode() {
        return toString().hashCode();
    }

    @Override
    public String toString() {
        return id + "_" + party;
    }
}
